//
// Created by Tony on 2024/7/2.
//

#ifndef PARSER_CLASS_PARSER_H
#define PARSER_CLASS_PARSER_H

#include "FunctionParser.h"
#include "ast/Ast.h"
#include "ast/list/clazz/ClassBody.h"
#include "ast/list/clazz/ClassDefine.h"
#include "ast/list/clazz/ClassModule.h"
#include "ast/list/clazz/FieldDefine.h"
#include "ast/list/clazz/MethodDefine.h"
#include "ast/list/view_build/AttributeSetterList.h"
#include "ast/list/view_build/ViewBuilderBlock.h"
#include "ast/list/view_build/ViewBuilderList.h"

namespace Parser {

class ClassParser : public FunctionParser {
public:
    ClassParser() = default;
    shared_ptr<Ast> parse() override;

protected:
    shared_ptr<FieldDefine> fieldDefine();
    shared_ptr<MethodDefine> methodDefine();
    shared_ptr<ClassBody> classBody();
    shared_ptr<ClassDefine> classDefine();
    shared_ptr<ClassModule> classModule();

    shared_ptr<AttributeSetterList> attributeSetterList();
    shared_ptr<ViewBuilderList> viewBuilderList();
    shared_ptr<ViewBuilderBlock> viewBuilderBlock();
};

} // namespace Parser

#endif // PARSER_CLASS_PARSER_H
